package homework_0318;
/**
 * @Author YuLiping
 * @Date 2024/3/19 9:17
 * @Description 圆形
 * @Since version-1.0
 */
public class Circle extends Graph{
    public static final double PI = 3.14;
    private double radius = 0; //半径
    public Circle() {
        super.drawGraph();
    }

    public double getRadius() {
        return radius;
    }

    public void setRadius(double radius) {
        this.radius = radius;
    }

    /**
     * @Author YiLiping
     * @Date 2024/3/19 9:25
     * @Description 计算面积
     * @Param [radius]
     * @Return void
     * @Since version-1.0
     */
    public void getArea(){
        double area=PI* this.radius * this.radius;
        System.out.println("此圆面积为："+area);
    }
}
